<div xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ice="http://www.icesoft.com/icefaces/component">
	
	<ice:panelGrid columns="1">
<!-- source options -->
		<ice:panelGroup>
		<ice:panelGrid columns="2">
			<f:facet name="header">
			<ice:panelGroup>
			<ice:outputText value="Source selection"/>
			</ice:panelGroup>
			</f:facet>
			<ice:panelGroup>
				<ice:selectOneListbox id="SlctOption"
					value="#{meteringMainBean.selectIpRangeOption}" partialSubmit="true"
					style="overflow: auto;height:75px"
					valueChangeListener="#{meteringMainBean.ipRangeOptionChangeListener}">
					<f:selectItems id="SlctOptionItms"
						value="#{meteringMainBean.ipRangeOptions}" />
				</ice:selectOneListbox>
			</ice:panelGroup>
			<ice:panelGroup>
			<!--set true, refresh and reset before make a new selection  -->
				<ice:selectOneListbox id="SourcesListBox" partialSubmit="true"
					value="#{meteringMainBean.selectIpRangeSource}"
					style="overflow: auto;width:110px;height:75px"
					valueChangeListener="#{meteringMainBean.ipRangeSourceChangeListener}">
					<f:selectItems id="SlctCtyItms"
						value="#{meteringMainBean.ipRangeSources}" />
				</ice:selectOneListbox>
			</ice:panelGroup>
			<f:facet name="footer">
				<ice:panelGroup>
				<ice:commandButton value="Save"
					action="#{meteringMainBean.saveIpRangOptionWithIpRangeSource}"
					disabled="#{!meteringMainBean.ipRangeSourceValueReassigned}" />
				<ice:commandButton value="Cancel"
					action="#{meteringMainBean.cancelIpRangOptionWithIpRangeSource}"
					disabled="#{!meteringMainBean.ipRangeSourceValueReassigned}"
					immediate="false" />
				</ice:panelGroup>
			</f:facet>
		</ice:panelGrid>
		</ice:panelGroup>
	<!-- refresh rate -->
		<ice:panelGroup>
			<ice:panelGrid columns="1">
				<f:facet name="header">
				<ice:panelGroup>
				<ice:outputText value="Refresh Rate"/>
				</ice:panelGroup>
				</f:facet>
				<ice:panelGroup>
					<ice:inputText value="#{meteringMainBean.refreshRate}"
					id="Refresh_rate"
					valueChangeListener="#{meteringMainBean.refreshRateChangeListener}"
					partialSubmit="true">
						<f:validateDoubleRange minimum="0.00" />
					</ice:inputText>
				</ice:panelGroup>
				<f:facet name="footer">
					<ice:panelGroup>
					<ice:commandButton value="SAVE"
						action="#{meteringMainBean.saveRefreshRate}"
						disabled="#{!meteringMainBean.enableRefreshRateSave}" />
					<ice:commandButton value="CANCEL"
						action="#{meteringMainBean.cancelRefreshRateChange}"
						disabled="#{!meteringMainBean.enableRefreshRateSave}"
						immediate="true" />
					</ice:panelGroup>
				</f:facet>				
			</ice:panelGrid>			
		</ice:panelGroup>
		
		<!-- Router config-->
		<ice:panelGroup>
			<ice:panelGrid columns="1" >
				<f:facet name="header">
					<ice:outputText value="Router Config" />
				</f:facet>
				<ice:panelGroup>
					<ice:outputLabel value="Address Remote" />
					<ice:inputText value="#{meteringMainBean.address_router_remote}"
						valueChangeListener="#{meteringMainBean.remoteRouterAddressConfigValueChangeListener}"
						partialSubmit="true">
					</ice:inputText>
				</ice:panelGroup>
				<ice:panelGroup>
					<ice:outputLabel value="Address Local" />
					<ice:inputText value="#{meteringMainBean.address_router_local}"
						valueChangeListener="#{meteringMainBean.localRouterAddressConfigValueChangeListener}"
						partialSubmit="true"></ice:inputText>
				</ice:panelGroup>
				<ice:panelGroup>
					<ice:outputLabel value="Port Remote" />
					<ice:inputText value="#{meteringMainBean.port_router_remote}"
						id="Port_Remote"
						valueChangeListener="#{meteringMainBean.port_router_remoteConfigValueChangeListener}"
						partialSubmit="true">
						<f:validateLongRange minimum="0" maximum="255"></f:validateLongRange>
					</ice:inputText>
				</ice:panelGroup>
				<ice:panelGroup>
					<ice:outputLabel value="Port Local" />
					<ice:inputText value="#{meteringMainBean.port_router_local}"
						id="Port_Local"
						valueChangeListener="#{meteringMainBean.port_router_localConfigValueChangeListener}"
						partialSubmit="true">
						<f:validateLongRange minimum="0" maximum="255"></f:validateLongRange>
					</ice:inputText>
				</ice:panelGroup>
				<ice:panelGroup>
					<ice:outputLabel value="SNMP Remote" />
					<ice:inputText value="#{meteringMainBean.snmp_router_remote}"
						valueChangeListener="#{meteringMainBean.snmp_router_remoteConfigValueChangeListener}"
						partialSubmit="true"></ice:inputText>
				</ice:panelGroup>
				<ice:panelGroup>
					<ice:outputLabel value="SNMP Local" />
					<ice:inputText value="#{meteringMainBean.snmp_router_local}"
						valueChangeListener="#{meteringMainBean.snmp_router_localConfigValueChangeListener}"
						partialSubmit="true"></ice:inputText>
				</ice:panelGroup>
				<f:facet name="footer">
					<ice:panelGroup>
					<ice:panelGroup>
						<ice:commandButton value="SAVE"
							action="#{meteringMainBean.saveRouterConfig}"
							disabled="#{!meteringMainBean.enableRouteConfigSave}" />
						<ice:commandButton value="CANCEL"
							action="#{meteringMainBean.cancelRouterConfigChange}"
							disabled="#{!meteringMainBean.enableRouteConfigSave}"
							immediate="true" />
					</ice:panelGroup>
					</ice:panelGroup>
				</f:facet>
			</ice:panelGrid>
		</ice:panelGroup>
		
<!-- File path -->
		<ice:panelGroup>
			<ice:panelGrid columns="1">
				<f:facet name="header">
					<ice:outputText value="File Path" />
				</f:facet>
				<ice:panelGroup>
					<ice:outputLabel value="Local" />
					<ice:inputText value="#{meteringMainBean.localfile_path}"
						valueChangeListener="#{meteringMainBean.localfilepathConfigValueCHangeListener}"
						partialSubmit="true">
					</ice:inputText>
				</ice:panelGroup>
				<ice:panelGroup>
					<ice:outputLabel value="Remote" />
					<ice:inputText value="#{meteringMainBean.remotefile_path}"
						valueChangeListener="#{meteringMainBean.remotefilepathConfigValueCHangeListener}"
						partialSubmit="true" />
				</ice:panelGroup>
				<f:facet name="footer">
					<ice:panelGroup>
						<ice:commandButton value="SAVE"
							action="#{meteringMainBean.saveFilePathConfig}"
							disabled="#{!meteringMainBean.enableFilepathSave}" />
						<ice:commandButton value="CANCEL"
							action="#{meteringMainBean.cancelFilePathConfigChange}"
							disabled="#{!meteringMainBean.enableFilepathSave}" immediate="true" />
					</ice:panelGroup>
				</f:facet>
			</ice:panelGrid>
		</ice:panelGroup>
	</ice:panelGrid>	
</div>

